package com.t11;


import java.util.Stack;

/**
 * Created by xuyiwei on 2018/7/22.
 */
public class SrackTest {
    public static void main(String[] args) {
        Stack<String> stack = new Stack<>();
        for(String s : "My dog has fleas".split(" ")){
            stack.push(s);
        }
        while (!stack.empty()){
            System.out.println(stack.pop()+" ");
        }
    }
}
